part of 'header.dart';

class MeInfoView extends StatelessWidget {
  MeInfoView({Key? key}) : super(key: key);
  final controller = Get.find<MeController>();
  @override
  Widget build(BuildContext context) {
    return Obx(() => Container(
          color: Color.fromARGB(controller.state.alpha.value, 255, 255, 255),
          padding: EdgeInsets.fromLTRB(20.w, SizeFit.statusBarHeight, 0, gap10),
          width: Get.width,
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Row(
                children: [
                  loadAvater(size: 60.w),
                  SizedBox(
                    width: gap12,
                  ),
                  InkWell(
                    onTap: () {
                      controller.loginAction();
                    },
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Text('登录/注册',
                            style: pfSCStyle(
                                color: ColorsUtil.title,
                                fontSize: font18,
                                fontWeight: FontWeight.bold)),
                        Visibility(
                            child: Text('用户名',
                                style: pfSCStyle(
                                  color: ColorsUtil.title,
                                  fontSize: font11,
                                )))
                      ],
                    ),
                  ),
                ],
              ),
              InkWell(
                onTap: () => Get.toNamed(RouterPath.setup),
                child: Container(
                  padding: EdgeInsets.only(right: 16.w),
                  alignment: Alignment.topRight,
                  height: 44.w,
                  width: 44.w,
                  child: Icon(
                    IconUtil.setup,
                    color: ColorsUtil.title,
                    size: 22.w,
                  ),
                ),
              )
            ],
          ),
        ));
  }
}
